﻿using AiXiu.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AiXiu.IBLL
{
    public interface IUserManager
    {
        /// <summary>
        /// 注册用户
        /// </summary>
        /// <param name="login">登录信息</param>
        /// <returns></returns>
        OperResult Register(TBLogins login);

        /// <summary>
        /// 通过用户名密码登录
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <param name="password">密码</param>
        /// <returns></returns>
        OperResult<TBUsers> LoginByUserName(string userName, string password);

        /// <summary>
        /// 通过手机号密码登录
        /// </summary>
        /// <param name="mobile">手机号</param>
        /// <param name="password">密码</param>
        /// <returns></returns>
        OperResult<TBUsers> LoginByMobile(string mobile, string password);

        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        OperResult<TBUsers> GetUser(int userId);


        /// <summary>
        /// 更新用户信息(不包含头像)
        /// </summary>
        /// <param name="user">用户信息</param>
        /// <returns></returns>
        OperResult<TBUsers> EditUser(TBUsers user);

        /// <summary>
        /// 编辑头像
        /// </summary>
        /// <param name="user">用户信息</param>
        /// <returns></returns>
        OperResult<TBUsers> EditAvatar(TBUsers user);

        List<TBUsers> GetList();
    }
}
